package com.shenmazong.lambda;

/**
 * @program: server-java-demo
 * @description: DefaultInterfaceMethod
 * @author: 亮子说编程
 * @create: 2020-10-19 15:29
 **/

interface AA {
    default void hello() {
        System.out.println("hello from AA");
    }
}

interface BB extends AA {
    @Override
    default void hello() {
        System.out.println("hello from BB");
    }
}

class DD implements AA {
    @Override
    public void hello() {
        System.out.println("hello from DD");
    }
}

public class DefaultInterfaceMethod2 extends DD  implements A, B{

    public static void main(String[] args) {
        new DefaultInterfaceMethod2().hello();
    }
}
